<?php


if (!isset($_GET['id'])) {
die("Hack attempt !");
}
else {
$categorie = fetch_categorie(intval($_GET['id']));
?>
<h2>Liste des billets de la catégorie <em><?php echo $categorie; ?></em></h1>
<?php echo desc_categorie($_GET['id']); 
echo '<br /><br />';

$rec = SQL::query("SELECT * FROM billets LEFT JOIN categorie ON billets.post_categorie = categorie.id_cat WHERE billets.post_categorie = '".$_GET['id']."'") or die(mysql_error());


while ($cat = SQL::assoc($rec))
{

?>
<li><a href="billet.php?id={billets.ID}"><?php echo $cat['title']; ?></a></li>

<!--
$tpl->set_block('billets', array(
'ID' => $cat['post_id'],
'TITRE_BILLET' => $cat['title'],
'DATE' => $cat['date']
));


}
//$tpl->parse();


$tpl->parse();
include 'bas.php';
-->
<?php
}
?>

<br />
<ul>

<?php
}
